package cn.springcloud.alibaba.feign;

import feign.Logger;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableFeignClients(basePackages = "cn.springcloud.alibaba.feign.client")
public class FeignAutoConfig {

	/**
	 * 日志level有4个级别
	 * 1.NONE，不记录任何日志
	 * 2.BASIC，仅记录请求方法、URL以及响应状态码和执行时间
	 * 3.HEADRES，除了BASIC以外的还会记录请求和响应的头信息
	 * 4.FULL,所有
	 */
	@Bean
	public Logger.Level feignLogger() {
		return Logger.Level.FULL;
	}
}
